package com.bikes.mileagetracker.entity;

import com.bikes.mileagetracker.orm.Column;
import com.bikes.mileagetracker.orm.DbType;
import com.bikes.mileagetracker.orm.Entity;
import com.bikes.mileagetracker.orm.Table;

@Table("T_LOCATION")
public class LocationEntity implements Entity<String> {


    @Column(value="id", type= DbType.TEXT)
    private String id;

    @Column(value="trackingId", type= DbType.TEXT)
    private String trackingId;

    @Column(value="userId", type= DbType.TEXT)
    private String userId;

    @Column(value="latitude", type= DbType.REAL)
    private double latitude;

    @Column(value="longitude", type= DbType.REAL)
    private double longitude;

    /**
     * 0 - normal
     * 1 - no accuracy
     * 2 - inaccuracy
     * 3 - kalman removed
     */
    @Column(value="locType", type=DbType.INTEGER)
    private int locType;

    @Column(value="updateTm", type= DbType.INTEGER)
    private long updateTm = System.currentTimeMillis();

    @Override
    public String getId() {
        return id;
    }

    @Override
    public void setId(String id) {
        this.id = id;
    }

    public String getTrackingId() {
        return trackingId;
    }

    public void setTrackingId(String trackingId) {
        this.trackingId = trackingId;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public double getLatitude() {
        return latitude;
    }

    public void setLatitude(double latitude) {
        this.latitude = latitude;
    }

    public double getLongitude() {
        return longitude;
    }

    public void setLongitude(double longitude) {
        this.longitude = longitude;
    }

    public long getUpdateTm() {
        return updateTm;
    }

    public void setUpdateTm(long updateTm) {
        this.updateTm = updateTm;
    }

    public int getLocType() {
        return locType;
    }

    public void setLocType(int locType) {
        this.locType = locType;
    }
}
